<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
  <title>停车场信息列表</title>
</head>
<body>

<div class="row">
  <div class="col-lg-12">
    <div class="breadcrumbs fixed">
      <ul class="breadcrumb">
        <li>
          <a href="/backend/dashboard">首页</a>
        </li>
        <li class="active">车主信息</li>
      </ul>
    </div>
  </div>
</div>
<div class="park_header">
  <div class="row">
    <div class="col-lg-12">
      <div class="portlet">
        <div class="portlet-heading dark">
          <div class="portlet-title">
            <h4>车主信息列表
              <small class="text-white"></small>
            </h4>
          </div>
        </div>
        <div class="dataTables_wrapper form-inline no-footer">
          <form method="post" action="driversoverview">
            <div class="row">
              <div class="col-sm-12">
                <div>
                  <div>
                    <div class="input-group">
                      <input type="text" name="username" value="${paging.queryCondition.username}" class="form-control input-sm" placeholder="请输入用户手机号" aria-controls="SampleDT">
                    <span class="input-group-btn">
                      <button class="btn btn-info btn-sm" type="submit">
                        <i class="fa fa-search"></i>
                        查询
                      </button>
                    </span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </form>

          <display:table list="${paging}" id="driver" class="datatable table table-hover table-striped table-bordered tc-table" requestURI="driversoverview" >
            <display:column title="用户手机号" value="${driver.username}"/>
            <display:column title="注册时间" value="${driver.registrationDate}"/>
            <display:column title="所在城市" value="${driver.currentCity}"/>
            <display:column title="登录状态" value="${driver.loginStatus}"/>
            <c:set value="已激活" var="accountStatus"/>
            <c:if test="${!driver.active}">
              <c:set value="已冻结" var="accountStatus"/>
            </c:if>
            <display:column title="账户状态" value="${accountStatus}"/>
            <display:column title="操作">
              <div class="btn-group btn-group-xs ">
                <a href="/backend/driverdetails?guid=${driver.guid}" title="详情" class="btn btn-inverse">
                  <i class="fa fa-eye icon-only"></i>
                </a>
                <c:if test="${driver.active}">
                  <a href="/backend/lockdriver?guid=${driver.guid}&lock=true&username=${paging.queryCondition.username}&page=${paging.queryCondition.page}" title="冻结账号" class="btn btn-danger">
                    <i class="fa fa-lock icon-only"></i>
                  </a>
                </c:if>
                <c:if test="${!driver.active}">
                  <a href="/backend/lockdriver?guid=${driver.guid}&lock=false&username=${paging.queryCondition.username}&page=${paging.queryCondition.page}" title="激活账号" class="btn btn-danger">
                    <i class="fa fa-unlock icon-only"></i>
                  </a>
                </c:if>
              </div>
            </display:column>
          </display:table>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
